﻿@using NewRen.Models;
@using NewRen.Models.ViewModel
@{
    vUserGroup group = ViewBag.User as vUserGroup;
    var showname= group.GroupName == null ? group.LoginName : group.GroupName;
    ViewBag.Title = "牛棚展示-" + showname;
}
<script src="~/Scripts/newren.usergroup.js"></script>
<link href="~/Styles/newren.usergroup.css" rel="stylesheet" />
<div class="container_10 box-bg">
    <div class="personal-header top20" style="vertical-align: middle;">
        <div class="left">
            @if (group.Picture == null)
            {
                <img src="/Images/userphoto.png" width="150" height="170"
                     alt=@group.GroupName />
            }
            else
            {
                <img src="/UserGroup/ShowPicture/@group.ID" width="150"
                     alt=@group.GroupName height="170" />
            }
        </div>
        <div class="personal-name left" style="margin-left:20px;">
            <h1>@group.GroupName
                @if (ViewBag.CurrentUser == null || ViewBag.IsCollected == false)
                {
                    <small>
                        <a href="javascript:addGroupCollect(@group.ID,'@ViewBag.SID')"
                           id="btnAddGroupCollect">收藏</a>
                    </small>
                }
                else
                {
                    <small>
                        <a href="javascript:cancelGroupCollect(@group.ID,'@ViewBag.SID')"
                           id="btnCancelGroupCollect">取消收藏</a>
                    </small>
                }
            </h1>
            @if (group.IsVerified)
            {
                <span class="show_verified_true">已认证</span>
            }
            else
            {
                <span class="show_verified_false">未认证</span>
            }
        </div>
        <div class="right right-3">
            <ul>
                <li>电话：@group.Phone</li>
                <li>微博：@group.Weibo</li>
                <li>微信：@group.WhatApp</li>
                <li>Email：@group.Email</li>
            </ul>
        </div>
        <div class="clr"></div>
    </div>

    <div class="top-border-yellow-1 personal-info">
        <h3>牛棚简介</h3>
        <div class="top10">
            @if (group.Description != null)
            {
                @group.Description
            }
            else
            {
                <span style="color:#FF9933;">这个人很懒,什么都没有留下</span>
            }
        </div>
    </div>
    <div class="top-border-yellow-1 personal-info">
        <h3>基本信息</h3>
        <div class="top10">
            <table>
                <tr>
                    <td class="rc1">城市</td>
                    <td>@group.City</td>
                </tr>
                <tr>
                    <td class="rc1">地址</td>
                    <td>@group.Address</td>
                </tr>
                <tr>
                    <td class="rc1">行业</td>
                    <td>@group.Industry</td>
                </tr>
            </table>
        </div>
    </div>
    <div class="top-border-yellow-1 personal-info">
        <h3>牛棚宣传图</h3>
        <div class="top10" id="group_img_list" style="width:800px">
            @if (group.Images.Count > 0)
            {
                <ul>
                    @foreach (Images img in group.Images)
                    {
                        <li>
                            <a href="#">
                                <img width="136" height="100" src="@img.Path" />
                            </a>
                            <span></span>
                        </li>
                    }
                </ul>
                <script>
                    $("#group_img_list").imgscroll({
                        speed: 30,    //图片滚动速度
                        amount: 0,    //图片滚动过渡时间
                        width: 1,     //图片滚动步数
                        dir: "left"   // "left" 或 "up" 向左或向上滚动
                    });
                </script>
            }
            else
            {
                <p style="text-align:center">暂无宣传图片</p>
            }
        </div>
    </div>
    <div class="top-border-yellow-1 personal-data">
        <h3>数据信息</h3>
        <div class="top10">
            <span class="pv_show">总浏览量：@group.PV</span>
            <span class="pv_show" style="border:0">今日浏览：@group.TodayPV</span>
            <span id="like" class="right">
                <label onclick="group_like(@group.ID,'@ViewBag.SID')" class="show_item">
                    <i class="icon-feed icon-feed-up"></i>
                    （<strong id="group_up">@group.Ups</strong>）
                </label>
            </span>
            <span id="hate" class="right">
                <label onclick="group_hate(@group.ID,'@ViewBag.SID')" class="show_item">
                    <i class="icon-feed icon-feed-down"></i>
                    （<strong id="group_down">@group.Downs</strong>）
                </label>
            </span>

        </div>
    </div>
    <div class="top-border-yellow-1 personal-description">
        <h3>牛棚牛人</h3>
        <div class="top10 lstUser" style="display:inline-block">
        </div>
        <script>
            var UserGroup_id=@group.ID;
            var SID="";
            Load();
        </script>
        <p class="loadMore" style="position:static;width:924px">下拉加载更多</p>
    </div>
</div>
